package team.tunan.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import team.tunan.common.Result;
import team.tunan.entity.Menu;
import team.tunan.service.IMenuService;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sqx
 * @since 2023-12-26
 */
@RestController
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    private IMenuService iMenuService;
    @GetMapping("/listByRole")
    public Result listByRole(@RequestParam String role){
        return Result.success(iMenuService.listByRole(role));
    }
}

